﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;

namespace Ruleweaver.Conditions
{
	[ContractClass(typeof(IConditionDeclarationContract))]
	public interface IConditionDeclaration
	{
		IEnumerable<Condition> GetConditions(Type targetType);
	}

	[ContractClassFor(typeof(IConditionDeclaration))]
	internal abstract class IConditionDeclarationContract : IConditionDeclaration
	{
		IEnumerable<Condition> IConditionDeclaration.GetConditions(Type targetType)
		{
			Contract.Requires(targetType != null);
			Contract.Ensures(Contract.Result<IEnumerable<Condition>>() != null);

			return null;
		}
	}
}